package com.yellow.dispatchservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yellow.dispatchservice.entity.RoutePlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RoutePlanMapper extends BaseMapper<RoutePlan> {

    @Select("select rp.end_point from " +
            "route_plans as rp inner join" +
            " dispatch_orders as do on rp.dispatch_id = do.dispatch_id where order_id = #{order_id} ")
     String getDestinationByOrderId(@Param(value = "order_id") Integer orderId);
}
